﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfVehicleInfo2.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfVehicleInfo2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>地接客车辆详情</title>
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sVehicleInfo.css" rel="stylesheet" />
    <%--chat--%>
    <link href="/themes/wStyle1/css/Chat/layim.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/carMessage.css" rel="stylesheet" />

</head>
<body>
    <input type="hidden" id="vehicleId" />
    <div class="wf_all">
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div id="container">
            <div id="main-content">
                <div class="contentInfo">
                    <div class="title">
                        <div class="row-fluid">
                            <div class="headPortrait">
                                <img id="headImg" />
                            </div>
                            <div class="userCoent">
                                <div class="row-fluid" id="userInfo">
                                    <a class="userName" target="_blank" href="/PageShow/DjackInfo" id="djackName"></a>
                                    <img id="sex" class="sex" />
                                </div>
                                <div class="row-fluid">
                                    <div class="region" id="area" style="display: none">
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="userInfo" id="userIntroduction">
                                    </div>
                                </div>
                                <div>
                                    <span id="receiverInfo" style="cursor: pointer; color: #ff6a00;" lg="false" 
                                        userid="" username="" userface="" onclick="chatShow(this);">
                                        <img src="/themes/wStyle1/Images/Chat/contact.gif" />
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="row-fluid carInfo">
                            <div class="VehicleImg">
                                <img id="carImg" />
                            </div>
                            <div class="VehicleInfo">
                                <div class="row-fluid">
                                    <div class="">
                                        <span class="carName" id="carName"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carType">
                                        <span class="VehicleBrand" id="carBrand"></span>|  <span class="VehicleSeats" id="carSeats"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carType">
                                        <span>服务类型：</span>  <span class="ServiceType" id="serviceType"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carType">
                                        <span>服务范围：</span>  <span class="ServiceArea" id="serviceArea"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carType">
                                        <span>车辆编号：</span>
                                        <span id="carNumber"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carPhone">
                                        <span>联系电话：</span> <span class="Conaction" id="phone"></span>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carIntroduction" id="VehicelIntro">
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="carMoney">
                                        <span class="money" id="carMoney"></span><span class="unit">起/天</span>
                                    </div>
                                    <div class="btnBuy"><a target="_blank" href="#">立即订购</a></div>
                                </div>
                            </div>
                        </div>
                        <div class="row-fluid menuInfo">
                            <span data_value="notice" class="checkMenu menu" style="margin-right: 13px;">购买须知</span>
                            <span data_value="comment" class="checkMenu">服务评价</span>
                        </div>
                        <div class="notice viewInfo">
                            <div class="row-fluid platform">
                                <div class="" id="serviceBuyNotes">
                                </div>
                            </div>
                            <div class="row-fluid personal">
                                <div class="" id="BuyShouldKnow">
                                </div>
                            </div>
                        </div>
                        <div class="viewInfo" style="display: none">
                            <div id="commentMsg">
                                <p>没有任何评论信息...</p>
                            </div>
                            <div id="divPage">
                            </div>
                            <xmp id="svc_list_temp" style="display: none">
                             <ul class="comment" id="commentList">
                                 {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                                    <li id="comment_{{d.rows[i].CUSTOMER_EVLUTION_ID}}" class='row-fluid commentList' isImg="{{d.rows[i].EVLUTION_HAS_PIC}}">
                                <div class='commenuListLeft'>
                                    <div class='userComment'>
                                                <img src='{{d.rows[i].CUSTOMER_DEFAULT_PIC}}' /><a>{{d.rows[i].CUSTOMER_NICK}}</a>
                                    </div>
                                </div>
                                <div class='commenuListRight'>
                                    <div class='row-fluid'>
                                                <div class='commentContents'>{{d.rows[i].EVLUTION_CONTENT}}</div>
                                    </div>
                                    <div class='row-fluid'>
                                                <div class='commentImg' id="imgs_{{d.rows[i].CUSTOMER_EVLUTION_ID}}">
                                                   
                                        </div>
                                    </div>
                                            <div class="tb-r-photo-viewer J_ViewStage" style="width: 400px; display:none">
                                        <div class="tb-r-photo-viewer-bar">
                                                    <a onclick="hideView(this);" class="J_Hide">
                                                <span class="tb-r-photo-icon tb-r-photo-icon-hide"></span>收起
                                            </a>
                                                    <a href="" class="J_Open" target="_blank">
                                                <span class="tb-r-photo-icon tb-r-photo-icon-open"></span>原图</a>
                                                    <a href="javascript:void(0)" onclick="rotateLeft('theimage_{{d.rows[i].CUSTOMER_EVLUTION_ID}}',90);" class="J_TurnLeft">
                                                        <span class="tb-r-photo-icon tb-r-photo-icon-turnleft"></span>向左转</a>
                                                    <a href="javascript:void(0)" onclick="rotateRight('theimage_{{d.rows[i].CUSTOMER_EVLUTION_ID}}',90);" class="J_TurnRight">
                                                        <span class="tb-r-photo-icon tb-r-photo-icon-turnright"></span>向右转</a>
                                        </div>
                                        <div class="J_StageMain tb-r-photo-stage-main">
                                            <div class="tb-r-photo-stage-imgbox J_Imgbox">
                                                        <img id="theimage_{{d.rows[i].CUSTOMER_EVLUTION_ID}}" src="" onload="resizeimg(this,this.width,this.height)"  />
                                            </div>
                                        </div>
                                    </div>
                                    <div class='row-fluid'>
                                                <div class='commentTime'>{{d.rows[i].EVLUTION_TIME}}</div>
                                    </div>
                                </div>
                            </li>
                                 {{#} }}
                                </ul>
                          </xmp>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--start JS引用-->
        <script src="/themes/wStyle1/js/Chat/lib.js"></script>
        <script src="/themes/wStyle1/js/Chat/layim.js"></script>
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>

        <%--chat--%>
        <script src="/jqPlugin/layer/layer.min.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>

        <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
        <script src="/themes/wStyle1/js/comm/jsPagination.js"></script>
        <script src="/themes/wStyle1/js/comm/commentmsg.js"></script>
        <!--end JS引用-->
        <script type="text/javascript">

            //菜单切换
            $(".menuInfo").children("span").click(function () {
                $(".viewInfo").hide();
                $(".menuInfo").children("span").removeClass("menu");
                $(this).addClass("menu");
                var make = $(this).attr("data_value");
                if (make == "notice") {
                    $(".viewInfo").eq(0).show();
                }
                else if (make == "comment") {
                    $(".viewInfo").eq(1).show();
                }

            });
            var pageIndex = 1;
            (function () {
                $("#vehicleId").val(GetQueryStr("vehicleId"));
                $("#headImg").click(function () {
                    window.open($("#djackName").attr("href"));
                });
                btnDo("getVehicleInfo");

                setTimeout(function () { getContentMsg(); }, 500);
            })()

            //获取评论 数据
            function getContentMsg() {
                var opart = new jsonRow();
                opart.AddCell("vehicleId", $("#vehicleId").val());
                opart.AddCell("pageIndex", pageIndex);
                opart.AddCell("ACTION", "getmsg");
                ajaxComm(opart);
            }
            //分页
            function goPage(Index) {
                pIndex = Index;
                getContentMsg();
            } Newbuy168
            //图片加载
            function loginImg() {
                $("#commentList").children("li").each(function (i, e) {
                    if ($(e).attr("isImg") == "True") {
                        //绑定图片
                        var commentID = $(e).attr("id").replace("comment_", "");
                        var opart = new jsonRow();
                        opart.AddCell("evlutionid", commentID);
                        opart.AddCell("ACTION", "getimgs");
                        ajaxComm(opart);
                    }
                });
            }
            //img
            function imgView(data, t) {
                var imgs = "";
                $(data.rows).each(function (i, e) {
                    imgs += '<img src="' + e.EVLUTION_IMAGES_SOURCE + '" title="评论图片" />';
                });
                $("#imgs_" + t).html(imgs);
                //绑定点击事件
                $("#imgs_" + t).children('img').click(function () {
                    var $showView = $(this).parent().parent().next();
                    $showView.find(".J_Open").attr("href", $(this).attr("src"));

                    $showView.show();
                    $showView.find(".J_Open").html();
                    $("#theimage_" + t).attr("src", $(this).attr("src"));
                });
            }


            function IniChat(uid, username, userface, friend, islogin) {
                if (islogin) {
                    xxim.Initialization(uid, username, userface, friend);
                    xxim.view();
                    xxim.renode();
                    xxim.getDates(0);
                    xxim.event();
                    xxim.layinit();
                    $("#receiverInfo").attr("lg", islogin);
                }
                else {
                    xxim.messageInitia(friend);
                }

            }

            function btnDo(sEbtn) {
                GtGrid1Action = sEbtn;
                var opart = GetGtParam();
                ajaxComm(opart);
            };

            function setVehicleInfo(data) {
                $("#headImg").attr("src", data.rows[0].CUSTOMER_DEFAULT_PIC + " 197x197img.jpg");
                $("#receiverInfo").attr("userface", data.rows[0].CUSTOMER_DEFAULT_PIC);

                $("#djackName").text(data.rows[0].CUSTOMER_NICK);
                $("#receiverInfo").attr("username", data.rows[0].CUSTOMER_NICK);

                $("#djackName").attr("href", "/wp_DjackInfo.htm?djackId=" + data.rows[0].DJACK_ID);
                $("#receiverInfo").attr("userid", data.rows[0].DJACK_ID);


                if (data.rows[0].CUSTOMER_BASEINFO_GENDER == "M" || data.rows[0].CUSTOMER_BASEINFO_GENDER == "F") {
                    var SexSrc = data.rows[0].CUSTOMER_BASEINFO_GENDER == "M" ? "/themes/wStyle1/Images/Public/man.png" : "/themes/wStyle1/Images/Public/woman.png";
                    $("#sex").attr("src", SexSrc);
                }
                $("#userIntroduction").text(data.rows[0].CUSTOMER_BASEINFO_INTRO);
                $("#area").text(data.rows[0].P_COUNTRY_NAME + " | " + data.rows[0].P_CITY_NAME + " | " + data.rows[0].P_DISTINATION_NAME);
                var lable = data.rows[0].SERVICE_LABEL;
                var arrLable = lable.split("|");
                $("#userInfo .lable").remove();
                if (!IsNull(arrLable)) {
                    arrLable.sort();
                    for (var i = 0; i < arrLable.length; i++) {
                        if (arrLable[i] == "1") {
                            $("#userInfo").append("<img class='lable' src='/themes/wStyle1/Images/Public/careful.png' />");
                        } else if (arrLable[i] == "2") {
                            $("#userInfo").append("<img class='lable' src='/themes/wStyle1/Images/Public/drawUp.png' />");
                        } else if (arrLable[i] == "3") {
                            $("#userInfo").append("<img class='lable' src='/themes/wStyle1/Images/Public/rouristGuide.png' />");
                        } else if (arrLable[i] == "4") {
                            $("#userInfo").append("<img class='lable' src='/themes/wStyle1/Images/Public/Guide.png' />");
                        }
                    }
                }
                $("#carImg").attr("src", data.rows[0].VEHICLE_DEFAULT_PIC + " 480x400img.jpg");
                $("#carName").text(data.rows[0].VEHICLE_NAME);
                $("#carBrand").text(data.rows[0].VEHICLE_BRAND_NAME);
                $("#carSeats").text(data.rows[0].VEHICLE_SEATS + "座");
                $("#serviceType").text(data.rows[0].VEHICLE_SERVICE_TYPE_NAME);
                $("#serviceArea").text(data.rows[0].VEHICLE_SERVICE_AREA);
                $("#carNumber").text(data.rows[0].VEHICLE_CODE);
                $("#VehicelIntro").html(data.rows[0].VEHICLE_INTRO);
                $("#phone").text(data.rows[0].CUSTOMER_BASEINFO_MOBILE);
                $("#carMoney").text("￥" + getNumber(data.rows[0].VEHICLE_PRICE_DAY));
                $("#BuyShouldKnow").html(data.rows[0].ORDER_SHOULD_KNOW);
                $(".btnBuy a").attr("href", "/wb_AddOrder.htm?carid=" + data.rows[0].VEHICLE_INFO_ID)
            }

            //执行AJAX调用时获取参数
            function GetGtParam() {
                var _jsParam = new jsonRow();
                _jsParam.AddCell("vehicleId", $("#vehicleId").val());
                _jsParam.AddCell("ACTION", GtGrid1Action);
                return _jsParam;
            };
        </script>
        <script src="/themes/wStyle1/js/Chat/chatMessage.js"></script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
